<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		
		<link rel="stylesheet" type="text/css" href="../css/index%20(1).css" />
		<script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/vant.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/ajax.js" type="text/javascript" charset="utf-8"></script>
		<script src="html5plus://ready"></script>
		<title></title>
		<style type="text/css">
		body{
			background-color: #fafafa;
		}
		#uppwd{
			margin-bottom: 10px;
		}
			#img>img {
				width: 70px;
				height: 70px;
				margin-top: 10px;
				margin-left: 10px;
				border-radius: 35px;
			}
			
			#span_right {
				margin-left: 20px;
			}
			
			#login {
				margin-top: 20px;
			}
			
			#one {
				background-color: red;
				height: 50px;
				
			}
			
			
			
			.van-nav-bar__title{
				color: white;
				font-size: 15px;
				padding-top: 5px;
			}
			.van-nav-bar .van-icon{
				color: white;
				
				padding-top: 10px;
			}
			.van-nav-bar__text{
				color: white;
				padding-top: 10px;
			}
			#info{
				margin-top: 20px;
				padding-left: 180px;
			}
			#dl{
			padding-left: 50px;
			padding-right: 50px;
			margin-bottom: 20px;
			margin-top: 20px;
		}
		</style>
	</head>

	<body>
		<div id="app">
			<van-row >
				<van-nav-bar  title="新增收货地址" left-text="返回" left-arrow id="one" @click-left="onClickLeft"></van-nav-bar>
				<van-address-edit
				  :area-list="areaList"
				  show-postal
				  show-delete
				  show-set-default
				  show-search-result
				  :search-result="searchResult"
				  
				></van-address-edit>
					
			</van-row>
			
			<van-row id="three">
				
				
			</van-row>
			
			
		</div>
		<script src="../js/area.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var key=localStorage.getItem("keys");
			console.log(key)
			ajax({
			url:"http://dsapi.ysd3g.com/API/AddShippingAddress",
			dataType:"JSONP",
			data:{
				key:key,
				name:"韦帅",
				phone:15286967000,
				districtCode:410502,
				address:"文峰区安阳职业技术学院",
				isdefault:true
				
			},
			success:function(res){
				console.log(res)
				/* for(var i=0;i<res.Data.length;i++){
					
					app.shops.push(res.Data[i]);
				} */
				
				
			}
			
			});
			var app = new Vue({
				el: "#app",
				data: {
					areaList:area,
					searchResult: []
				}
				,
				methods:{
					onClickLeft:function(){
						//window.location.href="../views/user-views/address.html";
						plus.webview.open("address.html","add")
						
					},
					onSave() {
						  Toast('save');
						},
						onDelete() {
						  Toast('delete');
						},
						onChangeDetail(val) {
						  if (val) {
							this.searchResult = [{
							  name: '黄龙万科中心',
							  address: '杭州市西湖区'
							}];
						  } else {
							this.searchResult = [];
						  }
						}
					}
			});
		</script>
	</body>

</html>